<?php $form=$this->beginWidget('FActiveForm', array(
    'id'=>'contact-form',
    'enableAjaxValidation'=>true,
    'clientOptions'=>array(
        'validationOnSubmit'=>true,
        //'afterValidate'=>'js:function(form, data, hasError){jQuery.fn.fixError(hasError);return true;}',
        //'afterValidateAttribute'=>'js:function(form, attribute, data, hasError){jQuery.fn.fixError(hasError);return true;}'
        ),
)); ?>
    <?php //echo $form->errorSummary($model); ?>

    <?php if (! $model->IsNewRecord) echo $form->hiddenField($model, "id") ; ?>
    <div class="row">
        <?php echo $form->labelEx($model,'fullname'); ?>
        <?php echo $form->textField($model,'fullname'); ?>
        <?php echo $form->error($model,'fullname',array('hideErrorMessage'=>true)); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'email'); ?>
        <?php echo $form->textField($model,'email'); ?>
        <?php echo $form->error($model,'email',array('hideErrorMessage'=>true)); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'phone'); ?>
        <?php echo $form->textField($model,'phone'); ?>
        <?php echo $form->error($model,'phone',array('hideErrorMessage'=>true)); ?>
    </div>
    
    <div class="row">
        <?php echo $form->labelEx($model,'office_interest'); ?>
        <?php echo $form->dropDownList($model,'office_interest',array(1=>'interest1',2=>'interest2'),array('prompt'=>'-Select-')); ?>
        <?php echo $form->error($model,'office_interest'); ?>
    </div>

    <div class="row">
        <div class="col-1">
            <?php echo $form->label($model,'company'); ?>
            <?php echo $form->textField($model,'company'); ?>
            <?php echo $form->error($model,'company'); ?>
        </div>
        <div class="col-2">
            <?php echo $form->label($model,'website'); ?>
            <?php echo $form->textField($model,'website'); ?>
            <?php echo $form->error($model,'website'); ?>    
        </div>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'inquire'); ?>
        <?php echo $form->dropDownList($model,'inquire',array(1=>'inquire1',2=>'inquire2'),array('prompt'=>'-Select-')); ?>
        <?php echo $form->error($model,'inquire',array('hideErrorMessage'=>true)); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'comments'); ?>
        <?php echo $form->textArea($model,'comments'); ?>
        <?php echo $form->error($model,'comments',array('hideErrorMessage'=>true)); ?>
    </div>
    
    <div class="row buttons">
        <?php echo CHtml::submitButton(''); ?>
    </div>

<?php $this->endWidget(); ?>
<!-- form -->